package com.csc.domain;

import java.io.Serializable;
import java.util.Collection;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

@Entity
@Table(name = "systemaccount")
public class SystemAccount implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "AccountLoginId")
	private String accountLoginId;

	@Column(name = "AccountPassword")
	private String accountPassword;

	@Column(name = "AccountIDCardNumber")
	private String accountIDCardNumber;

	@Column(name = "AccountFirstName")
	private String accountFirstName;

	@Column(name = "AccountLastName")
	private String accountLastName;

	@Column(name = "AccountMidName")
	private String accountMidName;

	@Column(name = "AccountPhone1")
	private String accountPhone1;

	@Column(name = "AccountPhone2")
	private String accountPhone2;

	@Column(name = "AccountEmail1")
	private String accountEmail1;

	@Column(name = "AccountEmail2")
	private String accountEmail2;

	@Column(name = "AccountAddress1")
	private String accountAddress1;

	@Column(name = "AccountAddress2")
	private String accountAddress2;


	@OneToOne
	@JoinColumn(name = "AccountType")
	private SystemAccountType systemAccountType;

	@OneToOne
	@JoinColumn(name = "StatusId")
	
	private SystemStatus systemStatus;

	@OneToMany(mappedBy = "accImpact")
	@JsonIgnore
	private Collection<TransactionHistory> accImpact;

	@OneToMany(mappedBy = "accAffected")
	@JsonIgnore
	private Collection<TransactionHistory> accAffected;

	@OneToMany(mappedBy = "sysAccount")
	@JsonIgnore
	private Collection<SystemTimeUsed> loginId;

	public SystemAccount() {
		super();
		// TODO Auto-generated constructor stub
	}

	public SystemAccount(String accountLoginId, String accountPassword,
			String accountIDCardNumber, String accountFirstName,
			String accountLastName, String accountMidName, String accountPhone1,
			String accountPhone2, String accountEmail1, String accountEmail2,
			String accountAddress1, String accountAddress2) {
		super();
		this.accountLoginId = accountLoginId;
		this.accountPassword = accountPassword;
		this.accountIDCardNumber = accountIDCardNumber;
		this.accountFirstName = accountFirstName;
		this.accountLastName = accountLastName;
		this.accountMidName = accountMidName;
		this.accountPhone1 = accountPhone1;
		this.accountPhone2 = accountPhone2;
		this.accountEmail1 = accountEmail1;
		this.accountEmail2 = accountEmail2;
		this.accountAddress1 = accountAddress1;
		this.accountAddress2 = accountAddress2;
	}

	public String getAccountLoginId() {
		return accountLoginId;
	}

	public void setAccountLoginId(String accountLoginId) {
		this.accountLoginId = accountLoginId;
	}

	public String getAccountPassword() {
		return accountPassword;
	}

	public void setAccountPassword(String accountPassword) {
		this.accountPassword = accountPassword;
	}

	public String getAccountIDCardNumber() {
		return accountIDCardNumber;
	}

	public void setAccountIDCardNumber(String accountIDCardNumber) {
		this.accountIDCardNumber = accountIDCardNumber;
	}

	public String getAccountFirstName() {
		return accountFirstName;
	}

	public void setAccountFirstName(String accountFirstName) {
		this.accountFirstName = accountFirstName;
	}

	public String getAccountLastName() {
		return accountLastName;
	}

	public void setAccountLastName(String accountLastName) {
		this.accountLastName = accountLastName;
	}

	public String getAccountMidName() {
		return accountMidName;
	}

	public void setAccountMidName(String accountMidName) {
		this.accountMidName = accountMidName;
	}

	public String getAccountPhone1() {
		return accountPhone1;
	}

	public void setAccountPhone1(String accountPhone1) {
		this.accountPhone1 = accountPhone1;
	}

	public String getAccountPhone2() {
		return accountPhone2;
	}

	public void setAccountPhone2(String accountPhone2) {
		this.accountPhone2 = accountPhone2;
	}

	public String getAccountEmail1() {
		return accountEmail1;
	}

	public void setAccountEmail1(String accountEmail1) {
		this.accountEmail1 = accountEmail1;
	}

	public String getAccountEmail2() {
		return accountEmail2;
	}

	public void setAccountEmail2(String accountEmail2) {
		this.accountEmail2 = accountEmail2;
	}


	public SystemAccountType getSystemAccountType() {
		return systemAccountType;
	}

	public void setSystemAccountType(SystemAccountType systemAccountType) {
		this.systemAccountType = systemAccountType;
	}

	public SystemStatus getSystemStatus() {
		return systemStatus;
	}

	public void setSystemStatus(SystemStatus systemStatus) {
		this.systemStatus = systemStatus;
	}

	public Collection<TransactionHistory> getAccImpact() {
		return accImpact;
	}

	public void setAccImpact(Collection<TransactionHistory> accImpact) {
		this.accImpact = accImpact;
	}

	public Collection<TransactionHistory> getAccAffected() {
		return accAffected;
	}

	public void setAccAffected(Collection<TransactionHistory> accAffected) {
		this.accAffected = accAffected;
	}

	public Collection<SystemTimeUsed> getLoginId() {
		return loginId;
	}

	public void setLoginId(Collection<SystemTimeUsed> loginId) {
		this.loginId = loginId;
	}

	public String getAccountAddress1() {
		return accountAddress1;
	}

	public void setAccountAddress1(String accountAddress1) {
		this.accountAddress1 = accountAddress1;
	}

	public String getAccountAddress2() {
		return accountAddress2;
	}

	public void setAccountAddress2(String accountAddress2) {
		this.accountAddress2 = accountAddress2;
	}

}
